import 'package:app/common/colors.dart';
import 'package:app/common/tool.dart';
import 'package:app/components/base_scaffold_appbar.dart';
import 'package:app/pages/document_module/create_folder_module/create_folder_controller.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:get/get.dart';

class CreateFolderView extends GetView{


  CreateFolderController controller = Get.put(CreateFolderController());

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      backgroundColor: AppColor.bgColor,
      appBar: BaseAppBar(
        preferredSize: Size(Get.width, AppTool.appBarHEIGHT),
        child: Text('新建文件夹'),
        action: [
          TextButton(onPressed: (){
            controller.requestDataCreate();
          }, child: Text('完成',style: TextStyle(color: Colors.white),))
        ],
      ),
      body: GetBuilder<CreateFolderController>(builder: (_){
        return Column(
          children: [
            Container(
              margin: EdgeInsets.only(top: 15),
              padding: EdgeInsets.only(left: 15),
              height: 45,
              color: Colors.white,
              child: TextField(
                controller: controller.editingController,
                decoration: const InputDecoration(
                  border: InputBorder.none,
                  hintText: '请输入一个文件夹名称'
                ),
              ),
            )
          ],
        );
      }),
    );
  }

}